Ch.2 Proof Techniques

Return to TOC

Rules of Inference

From textbook, page 66

RuleTautologyName
ppqq\begin{array}{l}p\\p\implies q\\\hline\therefore q\end{array}[p(pq)]q[p\land(p\implies q)]\implies qModus ponens
¬qpq¬q\begin{array}{l}\lnot q\\p\implies q\\\hline\therefore\lnot q\end{array}[¬q(pq)]¬p[\lnot q\land(p\implies q)]\implies\lnot pModus tollens
pqqrr\begin{array}{l}p\implies q\\q\implies r\\\hline\therefore r\end{array}[(pq)(qr)](pr)[(p\implies q)\land(q\implies r)]\implies (p\implies r)Hypothetical syllogism
pq¬pq\begin{array}{l}p\lor q\\\lnot p\\\hline\therefore q\end{array}[(pq)¬p]q[(p\lor q)\land\lnot p]\implies qDysjunctive syllogism
ppq\begin{array}{l}p\\\hline\therefore p\lor q\end{array}p(pq)p\implies(p\lor q)Addition
pqp\begin{array}{l}p\land q\\\hline\therefore p\end{array}(pq)p(p\land q)\implies pSimplification
pqpq\begin{array}{l}p\\q\\\hline\therefore p\land q\end{array}(p)(q)(pq)(p)\land(q)\implies(p\land q)Conjunction
pq¬prqr\begin{array}{l}p\lor q\\\lnot p\lor r\\\hline\therefore q\lor r\end{array}(pq)(¬pq)(qr)(p\lor q)\land(\lnot p\lor q)\implies(q\lor r)Resolution
Example 2.1

"It is not sunny this afternoon and it is colder than yesterday."
"We will go swimming only if it is sunny."
"If we do not go swimming, than we will take a canoe trip."
"If we take a canoe trip, then we will be home by sunset."
\therefore "We will be home by sunset."


We set
p=p= "It is sunny this afternoon."
q=q= "It is colder than yesterday"
r=r= "We will go swimming"
s=s= "We will take a canoe trip"
t=t= "We will be home by sunset"
Note: "Only if" is one-directional
1:¬pq2:rp3:¬rs4:stt\begin{array}{lr}1:&\lnot p\land q\\2:&r\implies p\\3:&\lnot r\implies s\\4:&s\implies t\\\hline&t\end{array}
5:¬pfrom 1 and simplification6:¬rfrom 2 and 5 and Modus tollens7:sfrom 3 and 6 and Modus ponens8:tfrom 4 and 7 and Modus ponens\begin{array}{rrl}5:&\lnot p&\text{from 1 and simplification}\\6:&\lnot r&\text{from 2 and 5 and Modus tollens}\\7:&s&\text{from 3 and 6 and Modus ponens}\\8:&t&\text{from 4 and 7 and Modus ponens}\end{array}


Proof by Contradiction

Show that if "n2n^2 is odd" (p)(p), then "nn is odd" (q)(q)
To show pqp\implies q, can show ¬q¬p\lnot q\implies\lnot p (contrapositive), but under Proof by Contradiction:
Assume nn is even [¬\lnot (nn is odd)]. Then by the definition of even numbers, n=2kn=2k for some kZk\in\mathbb{Z}. Thus, n2=(2k)2=2(2k2)n^2=(2k)^2=2(2k^2) is also even, which contradicts our statement. Hence, our assumption is false and nn is odd.

Example 2.6: Infinite Primes

Show that there are infinitely many prime numbers.
Proof by contradiction:
Assume there are finitely many primes, p1,p2,...,pNp_1,p_2,...,p_N. (If we can find just one more, we contradict the statement) Consider K=p1p2pN+1K=p_1p_2\cdots p_N+1. This is a natural number. If KK is prime, then K>piK>p_i for 1iN1\le i\le N, so we have a new prime number, contradicting the statement that there are only NN primes. If KK is not prime, then there is a prime qq that divides KK. However, qpiq\ne p_i for all 1iN1\le i\le N (can be proven by contradiction). Thus, we have a new prime number.
In both cases, we found a new prime number. Hence, our assumption that there are finitely many prime numbers is false, proving our theorem.

Example 2.7: Irrationality of 2\sqrt2

Prove 2\sqrt{2} is irrational.
Suppose 2\sqrt{2} is rational. Then it can be expressed as a fraction mn\frac{m}{n} where m,nZm,n\in\mathbb{Z}, n0n\ne0 and gcd(m,n)=1\text{gcd}(m,n)=1. Squaring both sides and clearing the denominator gives 2n2=m22n^2=m^2. Since m2m^2 is even, mm must also be even, so m=2km=2k for some integer kk. Thus,2n2=(2k)2n2=2k22n^2=(2k)^2\implies n^2=2k^2. Since n2n^2 is even, nn must also be even, so n=2ln=2l for some ll. However, this makes gcd(m,n)=2\text{gcd}(m,n)=2, a contradiction. Therefore, 2\sqrt{2} must be irrational.


Proof Tip

Finding an invariant quantity.

Example 2.8

Suppose you are moving on the plane according to the following rule:

  1. If you start at the origin, can you reach (1,1)(1,1)?
    • No, because (0,0)(0,0) maps to itself.
  2. Can you reach (1,1)(1,1) from (0.5,0.5)(0.5,0.5)?
    • (0.6x+0.8y)2+(0.8x0.6y)2=x2+y2(0.6x+0.8y)^2+(0.8x-0.6y)^2=x^2+y^2, so no matter how many times you move, the quantity x2+y2x^2+y^2 is invariant.
    • At (1,1)(1,1), this quantity is 12+12=11^2+1^2=1. At (0.5,0.5)(0.5,0.5), this quantity is 0.52+0.52=0.50.5^2+0.5^2=0.5, which are different, so no.